home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
Pakiet multimedia
/
Linux LiveCD
/
GeeXboX 1.0 EN
/
geexbox-1.0-en.i386.iso
/
GEEXBOX
/
etc
/
init.d
/
32_tvcard
< prev
next >
Wrap
Text File
|
2006-06-21
|
2KB
|
84 lines
#!/bin/sh
#
# setup tv cards
#
# runlevels: geexbox, debug, install
echo "### Setting up TV card ###"
if ! grep -q 'Class 0400:.*109e:' /proc/pci &&
! grep -q 'Class 0480:.*1131:' /proc/pci &&
! grep -q 'Class 0480:.*14f1:88' /proc/pci; then
# No supported TV card found
exit 1
fi
. /etc/tvcard
[ -f /etc/radio ] && . /etc/radio
CARD=
test "$TV_CARD" != "AUTO" && CARD="card=$TV_CARD"
TUNER=
test "$TV_TUNER" != "AUTO" && TUNER="tuner=$TV_TUNER"
RADIO_OPT=
test "$RADIO" = yes && RADIO_OPT="radio=1"
if grep -q 'Class 0400:.*109e:' /proc/pci; then
# BT8x8 Card
modprobe bttv $CARD $TUNER $RADIO_OPT >/dev/null 2>&1
if test "$TV_CARD" = "AUTO" \
-a -z "`dmesg | grep 'bttv0: detected'`"; then
# Not autodetected
test -z "$TUNER" && TUNER="tuner=3"
rmmod bttv
modprobe bttv card=1 $TUNER $RADIO_OPT >/dev/null 2>&1
fi
echo "TV_WIDTH=768" > /var/tvcard
echo "TV_HEIGHT=576" >> /var/tvcard
elif grep -q 'Class 0480:.*1131:' /proc/pci; then
# SAA7134 Card
modprobe saa7134 $CARD $TUNER >/dev/null 2>&1
echo -n "" > /var/tvcard
elif grep -q 'Class 0480:.*14f1:88' /proc/pci; then
# Conexant BT881/CX88 Card
modprobe tveeprom >/dev/null 2>&1
modprobe cx88xx $CARD $TUNER >/dev/null 2>&1
modprobe cx8800 >/dev/null 2>&1
# cx8800 module tries to autodetect/force tuner model according to eeprom.
# It fails if eeprom is corrupted so force tuner module loading before cx8800
if test "$TV_CARD" != "AUTO" \
-a -n "`dmesg | grep 'tveeprom: Encountered bad packet header'`"; then
rmmod cx8800 cx88xx tuner
modprobe cx88xx $CARD $TUNER >/dev/null 2>&1
modprobe tuner >/dev/null 2>&1
modprobe cx8800 >/dev/null 2>&1
fi
echo "TV_WIDTH=768" > /var/tvcard
echo "TV_HEIGHT=576" >> /var/tvcard
# CX88 driver reset color values to 0, so need to be forced.
echo "TV_BRIGHTNESS=50" >> /var/tvcard
echo "TV_CONTRAST=50" >> /var/tvcard
echo "TV_HUE=100" >> /var/tvcard
echo "TV_SATURATION=75" >> /var/tvcard
fi
TVIN_OPT=
if test -n "$TVIN_STANDARD" -a -n "$TVIN_SUB_STANDARD"; then
TVIN_OPT="$TVIN_STANDARD=$TVIN_SUB_STANDARD"
fi
modprobe tuner $TVIN_OPT >/dev/null 2>&1
modprobe tvaudio >/dev/null 2>&1
modprobe msp3400 >/dev/null 2>&1
modprobe tda7432 >/dev/null 2>&1
modprobe tda9875 >/dev/null 2>&1
modprobe tda9887 $TVIN_OPT >/dev/null 2>&1
exit 0